package com.example.cloud.model.business.medical;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Created by wangtao on 2018/7/2.
 * 折扣明细表
 */
@Entity(name = "treat_plan_home_discount_product_details")
@Data
@EqualsAndHashCode(callSuper = false)
public class TreatPlanHomeDiscountProductDetails extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 治疗病房主键
    @Column(name = "home_id")
    private Long homeId;
    // 折扣表主键
    @Column(name = "discount_id")
    private Long discountId;
    // 产品ID
    @Column(name = "product_id")
    private Long productId;
    @Column(name = "product_name")
    private String productName;
    // 折扣率
    @Column(name = "discount",columnDefinition = "DOUBLE(10,2) DEFAULT '0.00'")
    private Double discount;
}
